﻿@model Core.Objetos.VersaoDocumento
@using Web.Extensions

@{
    ViewBag.Title = "Biblioteca Digital - Novo documento";
}

<h2>Novo documento</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Preencha o formulário:</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.NumeroDoDocumento)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NumeroDoDocumento)
            @Html.ValidationMessageFor(model => model.NumeroDoDocumento)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.NumeroDoProtocolo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NumeroDoProtocolo)
            @Html.ValidationMessageFor(model => model.NumeroDoProtocolo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Titulo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Titulo)
            @Html.ValidationMessageFor(model => model.Titulo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TipoDoTitulo)
        </div>
        <div class="editor-field">
            @Html.EnumDropDownListFor(model => model.TipoDoTitulo)
            @Html.ValidationMessageFor(model => model.TipoDoTitulo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Descricao)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Descricao)
            @Html.ValidationMessageFor(model => model.Descricao)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Assunto)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Assunto)
            @Html.ValidationMessageFor(model => model.Assunto)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Autor)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Autor)
            @Html.ValidationMessageFor(model => model.Autor)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Destinatario)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Destinatario)
            @Html.ValidationMessageFor(model => model.Destinatario)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TipoDoDestinatario)
        </div>
        <div class="editor-field">
            @Html.EnumDropDownListFor(model => model.TipoDoDestinatario)
            @Html.ValidationMessageFor(model => model.TipoDoDestinatario)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Originador)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Originador)
            @Html.ValidationMessageFor(model => model.Originador)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Redator)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Redator)
            @Html.ValidationMessageFor(model => model.Redator)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Procedencia)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Procedencia)
            @Html.ValidationMessageFor(model => model.Procedencia)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Genero)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Genero)
            @Html.ValidationMessageFor(model => model.Genero)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Especie)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Especie)
            @Html.ValidationMessageFor(model => model.Especie)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Tipo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Tipo)
            @Html.ValidationMessageFor(model => model.Tipo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Idioma)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Idioma)
            @Html.ValidationMessageFor(model => model.Idioma)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.QuantidadeDeFolhas)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.QuantidadeDeFolhas)
            @Html.ValidationMessageFor(model => model.QuantidadeDeFolhas)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TemAnexos)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TemAnexos)
            @Html.ValidationMessageFor(model => model.TemAnexos)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataDeProducao)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataDeProducao)
            @Html.ValidationMessageFor(model => model.DataDeProducao)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Classe)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Classe)
            @Html.ValidationMessageFor(model => model.Classe)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DestinacaoPrevista)
        </div>
        <div class="editor-field">
            @Html.EnumDropDownListFor(model => model.DestinacaoPrevista)
            @Html.ValidationMessageFor(model => model.DestinacaoPrevista)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PrazoDeGuarda)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PrazoDeGuarda)
            @Html.ValidationMessageFor(model => model.PrazoDeGuarda)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Localizacao)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Localizacao)
            @Html.ValidationMessageFor(model => model.Localizacao)
        </div>

        <p>
            <input type="submit" value="Criar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Voltar para a lista", "Index")
</div>
